﻿<div class="container">
    <div class="row">
        <br />
    </div>
    <div class="row">
        <br />
    </div>
    <div class="panel panel-primary" title="Victim Info">
        <div class="panel-heading">
            <h3 class="panel-title">Victims</h3>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-2">
                    <div class="btn-toolbar">
                        <i id="addVictim" class="btn glyphicon glyphicon-plus" data-ng-click="toggleAddMode()" title="Add" value="Add" />
                    </div>
                </div>
                <div class="col-md-3">
                    <label>Age Range</label>
                </div>
                <div class="col-md-3">
                    <label>Status</label>
                </div>
                <div class="col-md-3">
                    <label>Gender</label>
                </div>
            </div>

            <div class="row addBorder" data-ng-show="addMode">
                <div class="col-md-2">
                    <div class="btn-toolbar">
                        <div class="btn-group">
                            <i id="saveButtonAdd" class="btn glyphicon glyphicon-save" data-ng-click="addVictim(victim)"></i>
                            <i class="btn glyphicon glyphicon-remove" data-ng-click="deleteVictim(victim)"></i>
                        </div>
                    </div>

                    <input type="hidden" data-ng-model="victim.people_Victim.ageRangeID" value="{{selectedItem.lookupID}}" />
                </div>
                <div class="col-md-3">
                    <select id="Age" data-ng-model="victim.ageRangeID" data-ng-options="c.lookupID as c.title for c in victimAge">
                        <option value="">-- chose Age Range --</option>
                    </select>
                    <input type="hidden" data-ng-model="victim.ageRangeID" value="{{selectedItem.lookupID}}" />
                </div>
                <div class="col-md-3">
                    <select id="Status" data-ng-model="victim.victimStatusID" data-ng-options="c.lookupID as c.title for c in victimStatus">
                        <option value="">-- chose Status --</option>
                    </select>
                    <input type="hidden" data-ng-model="victim.victimStatusID" value="{{selectedItem.lookupID}}" />
                </div>
                <div class="col-md-3">
                    <select id="Gender" data-ng-model="victim.genderID" data-ng-options="c.lookupID as c.title for c in victimGender">
                        <option value="">-- chose Status --</option>
                    </select>
                    <input type="hidden" data-ng-model="victim.genderID" value="{{selectedItem.lookupID}}" />
                </div>
            </div>
            <div data-ng-repeat="victim in victims">
                <section class="addBorder">
                    <div id="victimrow" class="row ">
                        <div class="col-md-2">
                            <div class="btn-toolbar" data-ng-show="victim.editMode == true">
                                <div class="btn-toolbar">
                                    <div class="btn-group">
                                        <i class="btn glyphicon glyphicon-save" data-ng-click="updateVictim(victim)"></i>
                                        <i class="btn glyphicon glyphicon-remove" data-ng-click="deleteVictim(victim)"></i>
                                    </div>
                                </div>
                            </div>
                            <div class="btn-toolbar" data-ng-show="victim.editMode == null || victim.editMode == false">
                                <div class="btn-toolbar">
                                    <div class="btn-group">
                                        <i class="btn glyphicon glyphicon-edit" data-ng-click="toggleEditMode(victim)"></i>
                                        <i class="btn glyphicon glyphicon-trash" data-ng-click="deleteVictim(victim)"></i>
                                    </div>
                                </div>
                            </div>
                            <input type="hidden" data-ng-model="victim.people_Victim.ageRangeID" value="{{selectedItem.lookupID}}" />
                        </div>
                        <div class="col-md-3">
                            <span data-ng-show="victim.editMode == null || victim.editMode == false">{{victim.lookup}}</span>
                            <select id="editAge" data-ng-show="victim.editMode == true" data-ng-model="victim.ageRangeID" data-ng-options="c.lookupID as c.title for c in victimAge">
                                <option value="">-- chose Age Range --</option>
                            </select>
                            <input type="hidden" data-ng-model="victim.ageRangeID" value="{{selectedItem.lookupID}}" />
                        </div>
                        <div class="col-md-3">
                            <span data-ng-show="victim.editMode == null || victim.editMode == false">{{victim.lookup1}}</span>
                            <select id="editStatus" data-ng-show="victim.editMode == true" data-ng-model="victim.victimStatusID" data-ng-options="c.lookupID as c.title for c in victimStatus">
                                <option value="">-- chose Status --</option>
                            </select>
                            <input type="hidden" data-ng-model="victim.victimStatusID" value="{{selectedItem.lookupID}}" />
                        </div>
                        <div class="col-md-3">
                            <span data-ng-show="victim.editMode == null || victim.editMode == false">{{victim.lookup2}}</span>
                            <select id="editGender" data-ng-show="victim.editMode == true" data-ng-model="victim.genderID" data-ng-options="c.lookupID as c.title for c in victimGender">
                                <option value="">-- chose Status --</option>
                            </select>
                            <input type="hidden" data-ng-model="victim.genderID" value="{{selectedItem.lookupID}}" />
                        </div>
                    </div>
                </section>
            </div>
        </div>

    </div>
</div>
